package com.example.validation;

//import jakarta.validation.Constraint;
//import jakarta.validation.Payload;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NotEmptyOrNullListValidator.class)
@Documented
public @interface NotEmptyOrNullList {
    String message() default "{NotEmptyOrNullList.message}";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};

    String value() default "List cannot contain null elements";
}
